Quote Originally Posted by effa
doesnt the argument for the operator = have to be a Vector& not an int.
If the parameter for operator= is a (const) reference to a Vector, then that operator= is a copy assignment operator. However, that does not restrict you from overloading operator= to take arguments of other types, such as int.

That said, anon stated what I was trying to hint at: that you might want to check if the return type of your operator[] is correct.